<#import "/spring.ftl" as spring/>
<#import "/common/base.ftl" as base/>
<@base.page  "调拨单">
<div class="row" ng-controller="allocationIndexController">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">
          	<div class="filterItems">
				    <form class="form-inline">
				      <div class="form-group">
				        <label for="orderCode">调拨单号:</label>
				        <input type="text" class="form-control round-border" ng-model="orderCode" name="orderCode" placeholder="">
				      </div>
				      <div class="form-group">
				        <label for="outWarehouseId">调出仓库:</label>
				        <select class="form-control"  ng-model="outWarehouseId" name="outWarehouseId">
					        <option value="" selected>全部</option>
					        <option value="1">仓库1</option>
					        <option value="2">仓库2</option>
				        </select>
				      </div>
				      <div class="form-group">
					      <label for="inWarehouseId">调入仓库:</label>
					      <select class="form-control"  ng-model="inWarehouseId" name="inWarehouseId">
					         <option value="" selected>全部</option>
					         <option value="1">仓库1</option>
					         <option value="2">仓库2</option>
				          </select>
				      </div>
				      <div class="form-group">
				        <label for="outUserName">调拨人:</label>
				        <input type="text" class="form-control round-border" ng-model="outUserName" placeholder="">
				      </div>
				      <button type="button" class="btn btn-primary searchBtn pull-right" style="margin-right:150px;" ng-click="Search()">查询</button>
				      
				      <br><br>
				     
				      <div class="form-group">
				        <label for="datepicker">调拨日期:</label>
				        <input type="text" class="form-control" placeholder="" ng-model="startCreateTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly"> 至 
						<input type="text" class="form-control" placeholder="" ng-model="endCreateTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly">
				      </div>
				      <div class="form-group">
				        <label for="datepicker">出仓日期:</label>
				        <input type="text" class="form-control" placeholder="" ng-model="startOutTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly"> 至 
						<input type="text" class="form-control" placeholder="" ng-model="endOutTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly">
				      </div>
				      <button type="button" class="btn btn-default pull-right" style="margin-right:150px;" ng-click="Reset()">重置</button>
				      
				      <br><br>
				      
				      <div class="form-group">
				        <label for="datepicker">到货日期:</label>
				        <input type="text" class="form-control" placeholder="" ng-model="startInTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly"> 至 
						<input type="text" class="form-control" placeholder="" ng-model="endInTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:120px" readonly="readonly">
				      </div>
				    </form>
          	</div>
           <br>
           <div class="row" style="width:100%;margin-left:20px;">
             <button type="button" class="btn btn-primary" id="Add" ng-click="Edit(null)">新增</button>
             <button type="button" class="btn btn-primary" id="Export" ng-click="exportcsv()">导出</button>
           </div>
            <div class="ibox-content">
              <ul class="nav nav-tabs"> 
			   <li class="active" id="286433" role="presentation"><a style="cursor:pointer;" ng-click="tabClick(286433,0)">未审核</a></li> 
			   <li class="" id="286434" role="presentation"><a style="cursor:pointer;" ng-click="tabClick(286434,1)">已审核</a></li> 
			   <li class="" id="286435" role="presentation"><a style="cursor:pointer;" ng-click="tabClick(286435,-1)">全部</a></li> 
			  </ul> 
			  <div class="tab-content"> 
			   <div class="tab-pane active"> 
			    <table class="table table-striped table-hover dataTables-example dataTable" style="width:100%"> 
			     <thead> 
			      <tr> 
			       <th class="text-center">调拨单号</th> 
			       <th class="text-center">审核状态</th> 
			       <th class="text-center">调出仓库</th> 
			       <th class="text-center">调入仓库</th> 
			       <th class="text-center">调拨日期</th> 
			       <th class="text-center">出仓日期</th> 
			       <th class="text-center">到货日期</th> 
			       <th class="text-center">调拨人</th> 
			       <th class="text-center">操作</th> 
			      </tr> 
			     </thead> 
			     <tbody> 
			      <tr class="ng-scope" ng-repeat="AllocationOrder in AllocationOrderBoList "> 
			       <td class="text-center">{{AllocationOrder.orderCode}}</td> 
			       <td class="text-center">{{AllocationOrder.orderStateStr}}</td>
			       <td class="text-center">{{AllocationOrder.outWarehouseName}}</td>
			       <td class="text-center">{{AllocationOrder.inWarehouseName}}</td>
			       <td class="text-center">{{AllocationOrder.createTime|date:'yyyy-MM-dd'}}</td>
			       <td class="text-center">{{AllocationOrder.outTime|date:'yyyy-MM-dd'}}</td>
			       <td class="text-center">{{AllocationOrder.inTime|date:'yyyy-MM-dd'}}</td>
			       <td class="text-center">{{AllocationOrder.outUserName}}</td>
			       <td class="text-center">
			         <a style="cursor:pointer;" ng-click="ShowDetail(AllocationOrder);">查看</a> 
					 <a style="cursor:pointer;" ng-if="AllocationOrder.orderState==0" ng-click="Edit(AllocationOrder);">编辑</a>
					 <a style="cursor:pointer;" ng-if="AllocationOrder.orderState==0" ng-click="Check(AllocationOrder.id);">审核</a>
					 <a style="cursor:pointer;" ng-if="AllocationOrder.orderState==0" ng-click="Cancel(AllocationOrder.id);">取消</a>
			       </td> 
			      </tr> 
			      <tr> 
			       <td colspan="9" class="text-center"> 
			        <nav>
						<ul class="pagination">
						<li>
							<a href="#" aria-label="Previous" ng-click="GotoPage(CurrentPage-1)"><span aria-hidden="true">上一页</span></a>
						</li>
						<li ng-click="GotoPage(page)" href="#" ng-repeat="page in ShowPages">
							<a href="#">{{page}}</a>
						</li>
						<li>
							<a href="#" aria-label="Next" ng-click="GotoPage(CurrentPage+1)"><span aria-hidden="true">下一页</span></a>
						</li>
						</ul>
						<b><span style="padding: 30px 19px 14px 20px;position: absolute;">第 {{CurrentPage}} 页 {{RecordCount}} 条</span></b>
					</nav>
			       </td> 
			      </tr> 
			     </tbody> 
			    </table> 
			   </div> 
			  </div>
            </div>
        </div>
    </div>
</div>
<script src="<@spring.url '/assets/pagejs/allocation/allocation.js' />"></script>
</@base.page>
